<?php
/*=============================================================================
|| ##################################################################
||	phpFoX Konsort
|| ##################################################################
||
||	Copyright		: (C) 2005-2007 PHPFOX Limited a Reality Fox Creation
||	Contact			: info@phpfox.com
||
||	- phpFoX and all of its source code and files are protected by Copyright Laws.
||
||	- The license for phpFoX permits you to install this software on a single domain (.com, .org, .net, etc.).
||
||	- You may also not remove this copyright screen which shows the copyright information and credits for phpFoX (RealityFOX Creations).
||
||	- phpFoX Konsort is NOT a FREE software - http://www.phpfox.com/license/
||
|| ##################################################################
=============================================================================*/

/* $File: ./include/modules/Blog/classes/PhpFox_ComponentTopBloggers.class.php, $Author:  $ */



/** Component for showing top bloggers list
 *
 * @version $Id: PhpFox_ComponentTopBloggers.class.php 46 2007-12-14 23:12:21Z phpfoxsv $
 * @package module.blog
 */
class PhpFox_Mod_Blog_ComponentTopBloggers extends BaseComponent
{
    function process()
    {
        $oBlogService = &$this->_oModule->getService('Blog');
        /* @var $oBlogService PhpFox_Mod_Blog_ServiceBlog */
        $oSecurityService = App::getModuleService('Account', 'Security');
        /* @var $oSecurityService PhpFox_Mod_Account_ServiceSecurity */
        $oReq = &App::getRequest();
        $oUrl = &App::getUrl();
        $oTpl = $this->_oModule->getTemplate();

        $oSecurityService->checkPerm('blog', array('read_only', 'full'));
        $oSecurityService->checkAccess('blogs');
        $iCount = App::getParam('public.bloggers_count');
        $aItems = $oBlogService->getTopBloggersList($iCount);

        $oTpl->assign(array(
        	'aItems' => $aItems,
        ));
        return $oTpl->fetch('TopBloggers.html');
    }
}
?>